<%@ page language="java" contentType="text/html;charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/commons/taglibs.jsp"%>
<%@ include file="/commons/mdmdialog.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
<title>New Dealer Information</title>
<link rel="stylesheet" type="text/css" href="${ctx}/styles/sidecss.css" />
<link rel="stylesheet" type="text/css"
	href="${ctx}/widgets/My97DatePicker/skin/WdatePicker.css" />
<script type="text/javascript" src="${ctx}/scripts/WinSollAuto.js"></script>
<script type="text/javascript"
	src="${ctx}/widgets/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="${ctx}/scripts/base.js"></script>
<script type="text/javascript" src="${ctx}/scripts/validate.js"></script>
<style type="text/css">
	.chkradio {
		width: 18px!important;
		height: 18px!important;
		border: 0!important;
		vertical-align: middle!important;
		padding-right: 4px!important;
	}
</style>
<script type="text/javascript">
	$(document)
			.ready(
					function() {
						$("#save")
								.click(
										function() {
											var hphType=$('input:radio[name="hphType"]:checked').val();
											if(hphType=='1'){
												var paymentDays=$.trim($("#paymentDays")
														.val());
												if(paymentDays==''){
													alert("Please enter the account period");
													return;
												}
											}
											
											//经纬
											var longitude = $.trim($(
													"#longitude").val());
											var latitude = $
													.trim($("#latitude").val());
											//经销商地址
											var address = $.trim($("#address")
													.val());
											//经销商名称
											var poiName = $.trim($("#poiName")
													.val());
											//所属区域城市
											var countyName = $.trim($("#countyName")
													.val());
											//最小起订金额
											var minOrderAmount = $.trim($("#minOrderAmount")
													.val());
											//联系电话
											var telephone=$.trim($("#telephone")
													.val());
											//工商注册名称
											var businessRegName=$("#bussinessRegName").val();
											//手续费率
											var rate=$("#rate").val();
											var pattern =/^[0]+([.]\d{4})?$/;
											<%-- 20161208 zsljava修改 经销商信息维护和人员管理新 --%>
											//姓名
											var nickName= $.trim($("#nickName").val()); //姓名
											if(nickName==""){
												alert("Name cannot be empty，please input again！");
												return;
											}
											//角色
											var custTitle= $.trim($("#custTitle").val());
											if(custTitle==""){
												alert("Role cannot be empty！");
												return;
											}
											//经销商类型
											var dealerSourceType = $.trim($("#dealerSourceType")
													.val());
											if(dealerSourceType==""){
												alert("Distributor Type cannot be empty");
												return;
											}
                                            //是否是平台经销商
                                            var userType = $.trim($("#userType")
                                                .val());
                                            if(userType == 1 && dealerSourceType == "二分商" ){
                                                alert("Platform dealers can not be dichotomous type");
                                                return;
                                            }
                                            if(userType == 1 && dealerSourceType == "镇镇通经销商新版" ){
                                                alert("Platform distributor cannot be the new version of zhenzhen Distributor");
                                                return;
                                            }
                                            if(userType == 1 && dealerSourceType == "镇镇通经销商" ){
                                                alert("Platform dealers should not be town - town connections Distributor Type");
                                                return;
                                            }
                                            if(rate == "" || !pattern.test(rate)) {
                                                alert("Hello,Handling Fee Rates must be less than 1 and four decimal places！");
                                                return;
                                            }
                                            if(businessRegName!=null && businessRegName.length>30){
                                                alert("Hello,You enter the Name on Business Registration to long！");
                                                $("#businessRegName").focus();
                                                return;
                                            }
                                            var patrn=/[`~!@#$%^&*()_+<>?:"{},.\/;'[\]]/im;
                                            var isPhone = /1[0-9]{10,10}|([0-9]{3,4}-)?[0-9]{7,8}/im;//座机

                                            if (poiName == "") {
                                                alert("Hello，Distributor Name cannot be empty！");
                                                $("#poiName").focus();
                                                return;
                                            }
                                            if(longitude == "" || latitude == "") {
                                                alert("Hello，Longitude、Latitude cannot be empty！");
                                                return;
                                            }else if(longitude == "0.0" || latitude == "0.0"){
                                                alert("Hello，Longitude、Latitude cannot default to 0.0！");
                                                return;
                                            }
                                            if (address == "") {
                                                alert("Hello，Distributor Address cannot be empty！");
                                                $("#address").focus();
                                                return;
                                            }
                                            if (countyName == "") {
                                                alert("Hello，Region city cannot be empty！");
                                                $("#countyName").focus();
                                                return;
                                            }
                                            if(minOrderAmount!='' && !new RegExp("^(([0-9])+[.]{0,1}([0-9]{0,2}))$").test(minOrderAmount)){
                                                alert("Hello，MIN Order Amount must be up to two decimal places！");
                                                $("#minOrderAmount").focus();
                                                return;
                                            }
                                            if(minOrderAmount!='' && minOrderAmount<1){
                                                alert("Hello，MIN Order Amount minimum value is greater than or equal to 1！");
                                                $("#minOrderAmount").focus();
                                                return;
                                            }
                                            //合同签署时间
                                            var contractDate = $("#contractDate").val();
                                            if(contractDate == null || contractDate == "" ){
                                                alert("Date of Signing the Contract cannot be empty");
                                                return;
                                            }
											//营业执照
											var charterUrl = $.trim($("#charterUrl")
													.val());
											if(charterUrl==""){
												alert("Business License cannot be empty cannot be empty");
												return;
											}
											//惠下单合同
											var hxdUrl = $.trim($("#hxdUrl")
													.val());
											if(hxdUrl==""){
												alert("hxd contract cannot be empty");
												return;
											}
											//手持身份证照片
											var handheldIdCardUrl = $.trim($("#handheldIdCardUrl").val());
											if(handheldIdCardUrl==""){
												alert("Photo of Holding the ID Card cannot be empty");
												return;
											}
											//身份证正面
											var idCardUrl = $.trim($("#idCardUrl").val());
											if(idCardUrl==""){
												alert("Front Photo of ID Card cannot be empty");
												return;
											}
											//身份证反面
											var idCardBackUrl = $.trim($("#idCardBackUrl").val());
											if(idCardBackUrl==""){
												alert("Back Photo of ID card cannot be empty");
												return;
											}
											//用户名
											var mobile = $.trim($("#mobile").val());
											if(mobile=="") {
												alert("Hello，User Name cannot be empty");
												return;
											}else{
												$.ajaxSetup({
													  async: false
												});
												var flag = false;
												$.ajax({ 
									      		     type:"post", //请求方式
									      		     url:"${ctx}/crm/wsCustomerInfo.do?method=validateUniqueDealerCustomer", //请求路径
									      		     data:{mobile:mobile,custTitle:custTitle},  //传参
									      		     dataType: "text",   //返回值类型       使用json的话也可以，但是需要在JS中编写迭代的html代码，如果格式样式
										      		 success:function(data){
										      			 if(data=='0'){
										      				flag = false;
										      				//alert("发送成功！");
										      			 }else if(data=='2'){
										      				alert("The user already exists,Please check！");
										      				flag = true;
										      			 }else if(data=='1'){
										      				alert("This dealer already has the role of dealer personnel, please check！");
										      				flag = true;
										      			 }
										      			
										      		   }
												});
											}
											if(flag){
												return ;
											}

											if(telephone=="" || !isPhone.test(telephone) || win.regIsNull(telephone)) {
												alert("Hello，Please enter a valid telephone number or landline！");
												$("#telephone").focus();
												return;
											} else {
												$.ajax({ 
									      		     type:"post", //请求方式
									      		     url:"${ctx}/crmPoiInfo/crmPoiInfoAction.do?method=isIllegalUserGisInfo", //请求路径
									      		     data:{longitude:longitude, latitude:latitude},  //传参
									      		     dataType: "text",   //返回值类型       使用json的话也可以，但是需要在JS中编写迭代的html代码，如果格式样式
										      		 success:function(data){
										      			 if(data=='0'){
										      				$("#userType").removeAttr("disabled");
										      				var from = document.crmPoiInfoForm;
										  		    		from.submit();
										      				//alert("发送成功！");
										      			 }else{
										      				alert("Hello，The latitude and longitude you entered is wrong, please check again and enter again！");
										      			 }
										      		   }
												});
												
											}

										});
						$("#dealerSourceType").change(function(){
                            //经销商类型为二分商时，默认为非平台经销商，且不可选择
                            var dealerSourceType = $.trim($("#dealerSourceType")
                                .val());
                            if(dealerSourceType == "二分商" || dealerSourceType == "镇镇通经销商" || dealerSourceType == "镇镇通经销商新版"){
                                $("#userType").val(0);
                                $("#userType").attr("disabled","disabled").css("background-color","#EEEEEE;");
                            } else {
                                $("#userType").removeAttr("disabled");
                                $("#userType").css("background-color","");
							}

							/* //经销商类型为二分商时，是否是镇镇通经销商标记才能选择是
							if(dealerSourceType != "二分商"){
								$("#isZZTDealerSourceType").val("");
                            	var isZZTDealerSourceTypeSelect = document.getElementById("isZZTDealerSourceType");
    							for(var i=0;i<isZZTDealerSourceTypeSelect.options.length;i++){
    								if(isZZTDealerSourceTypeSelect.options[i].value == "1"){
         								isZZTDealerSourceTypeSelect.options[i].disabled=true;
           								break;
       								}
   								}     
                            } else {
                            	var isZZTDealerSourceTypeSelect = document.getElementById("isZZTDealerSourceType");
    							for(var i=0;i<isZZTDealerSourceTypeSelect.options.length;i++){
    								if(isZZTDealerSourceTypeSelect.options[i].value == "1"){
         								isZZTDealerSourceTypeSelect.options[i].disabled=false;
           								break;
       								}
   								}     
                            } */
						});
						
					});
	
	function createCode() {
		var grp = $("#grp").val();
		var paramData = {
			"grp" : grp
		};
		$.post("${ctx}/crm/wsCustomerInfo.do?method=createUniqueAccessCode",
				paramData, function(data) {
					if (data != "") {
						$("#custAccessCode").show();
						$("#custAccessCode").val(data);
						alert("Generate success！");
					} else {
						alert("Generate failure！");
					}
				});
	}
	function selectCity() {
		var form = document.forms[0];
		openRegionDialogList('${ctx}', '0', 'regionList2', form.countyName.value,form.regionCode.value, '', function(v) {
					if (v) {
						form.countyName.value = v.text;
						form.regionCode.value = v.id;
					}
				});
	}
	function changedCity(obj){
		$('#area option').each(function(){
		         $(this).remove();
		});
		var opStr="<option value=''>Please select</option>";
		
		$.ajax({  
				 url:"${ctx}/crmPoiInfo/crmPoiInfoAction.do?method=getAreaByCityId&cityId="+obj,  
				data:"",  
				type:'post',  
				dataType:'json',  
				success:function(data){  
					$.each(data,function(i){ 
						var vid=data[i]['area'];
						var vname=data[i]['areaName'];
						//alert("vid="+vid);
						/* $.each(data[i],function(key,value){  
						alert(i+":"+key+" "+value);  
							
						});  */
						opStr+="<option value='"+vid+"'>"+vname+"</option>";
						//$("#deliverMan").append("<option value="+vid+">"+vname+"<option>");
					}) ;
					$("#area").append(opStr);
				},  
				error:  function(){  
				 alert("Description Failed to obtain the shipper information");
				}                     
			});
	} 
	function payShow() {
		var payMethod=$('input:radio[name="payMethods"]:checked').val();
		if(payMethod==1){
			$("#cashPayShow").show();
		}else{
			$("#cashPayShow").hide();
		}
	}
	function openUploadfileWindow(grp,tid) {
		 var url = '${ctx}/uploadIframe.jsp';
        $("#uploadIframe").attr("src",url); //设置IFRAME的SRC;
        $("#dialog").dialog({
               bgiframe: true,
               resizable: true, //是否可以重置大小
               height: 283, //高度
               width: 800, //宽度
               draggable:true, //是否可以拖动。
               title: " Photo upload",
               modal: true,
               position:['center','center'],
               open: function (e) {  //打开的时候触发的事件

               },
               close: function () { //关闭Dialog时候触发的事件
                     var ofrm1 = document.getElementById("uploadIframe").document;
                     var returnVal = "";
                     if (ofrm1==undefined)
                     {
                       var uploadform = window.frames["uploadIframe"].document;
                       returnVal = uploadform.getElementById("returnVal").value;
                     }
                     else
                     {
                        returnVal = document.frames["uploadIframe"].document.getElementById("returnVal").value;
                     }       
                     if(returnVal!=''&& returnVal!=undefined){
                         var data = $.parseJSON(returnVal);
	                   	  if(checkSuffix(data.downloadURL)){
	                          $('#' + tid).val(data.downloadURL);
	                          changeImg(tid,data.downloadURL);
	                	  }
                     }

               }

           });
   }
	function clearValue(tid) {
		$('#' + tid).val("");
		changeImg(tid,"");
	}
	function changeImg(id,url){
		if(url == ""){
			$("#"+id+"Link").hide();
		}else{
			$("#"+id+"Link").show();
		}
		
		$("#"+id+"Img").attr("src","").attr("src",url);
		$("#"+id+"Link").attr("href",url);
		$("#change").val("1");
	}
	function checkSuffix(str)
	{
	  var strRegex = "(.jpg|.png|.gif|.jpeg)$"; //用于验证图片扩展名的正则表达式
	  var re=new RegExp(strRegex);
	  if (re.test(str.toLowerCase())){
	    return true;
	  } else{
	    alert("Image format only supported .jpg|.png|.gif|.jpeg，Please upload again");
	    return false;
	  }
	}
</script>
</head>

<body onLoad="WindowSollAuto()" onResize="WindowSollAuto()">
	<jsp:include page="/commons/messages.jsp" flush="true"></jsp:include>
	<div style="display:none;overflow:hidden;padding:3px" id="dialog">
        <iframe frameborder="no" border="0" marginwidth="0" marginheight="0" id="uploadIframe" name="uploadIframe" scrolling="no"  width="100%" height="245"></iframe>
    </div>
	<html:form action="/crmPoiInfo/crmPoiInfoAction.do?method=saveDealer"
		method="post">

		<div class="bosom_one">
			<div class="bosom_top">
				<span class="left"></span>
				<h4>New Dealer Information</h4>
				<div class='MenuList'>
					<a href="#" id="save">Save</a> <a
						href="${ctx}/crmPoiInfo/crmPoiInfoAction.do?method=listForDealer">Back</a>
				</div>
				<span class="right"></span>
			</div>
			<div class="bosom_side">
				<div class="casing">
					<div class="caput">
						<span class="left"></span><span class="right"></span>
					</div>
					<div class="viscera" id="SollAuto">
						<div class="sheet_div">
							<table class="list_add">
							<input type="text" style="width:0;height:0;float:left;visibility:hidden"/>
							<input type="password" style="width:0;height:0;float:left;visibility:hidden"/>
								<tr>
									<td class="formTable" width="1%"><font color='red'>*</font>Distributor Name</td>
									<td align="left"><html:text property="poiName"
											styleId="poiName"></html:text></td>
							 		<td class="formTable" width="1%"><font color='red'>*</font>Region City</td>
									<td align="left">
										<html:text property="countyName" styleId="countyName" styleClass="select_but" onclick="selectCity()" readonly="true" /> 
										<html:hidden property="regionCode" styleId="regionCode" value="${crmPoiInfo.regionCode }" />
										 
									</td>
								</tr> 
								
								<tr>
									<td class="formTable" width="1%"><font color='red'>*</font>Name</td>
									<td align="left"><html:text property="nickName"
											styleId="nickName"></html:text></td>
							 		<td class="formTable" width="1%"><font color='red'>*</font>Distributor Address</td>
									<td align="left"><html:text property="address"
											styleId="address"></html:text></td>
								</tr> 
								
								<tr>
								<td class="formTable" width="1%"><font color='red'>*</font>User Name</td>
									<td align="left"><html:text property="mobile"
											styleId="mobile"></html:text></td>
									
									<td class="formTable" width="1%"><font color='red'>*</font>Contact Phone Number</td>
									<td align="left"><html:text property="telephone"
											styleId="telephone"></html:text></td>
								</tr>
																
								<tr>
								<td class="formTable" width="1%">Password</td>
									<td align="left"><html:password property="password"
											styleId="password"></html:password>Password is empty, the default password is the last six digits of the mobile phone number</td>
									
									<td class="formTable" width="1%">MIN Order Amount</td>
									<td align="left"><html:text property="minOrderAmount"
											styleId="minOrderAmount"></html:text></td>
								</tr>
								
								<tr>
									<td class="formTable" width="1%">Support Mobile Payment or not</td>
										<td align="left">
											<html:radio property="payMethods" value="1" styleClass="chkradio" onchange="payShow()">yes</html:radio>
											<html:radio property="payMethods" value="0" styleClass="chkradio" onchange="payShow()">no</html:radio>
										</td>
										<td class="formTable" width="1%"><font color='red'>*</font>Handling Fee Rates</td>
										<td align="left"><html:text property="rate" styleId="rate"></html:text><font color='red'>  e.g. 0.0001 (Accurate to the Four decimal Places)</font>
										</td>
								</tr>
								<tr>
									<td class="formTable" width="1%">A Distributor of Hui Distribution or not</td>
									<td align="left">
										<html:radio property="hphFlag" value="1" styleClass="chkradio" >yes</html:radio>
										<html:radio property="hphFlag" value="0" styleClass="chkradio" >no</html:radio>
									</td>
									<td class="formTable" width="1%">Support Bluetooth Printer or not：</td>
									<td align="left">
										<html:radio property="orderBluetoothPrint" value="1" styleClass="chkradio">yes</html:radio>
										<html:radio property="orderBluetoothPrint" value="0" styleClass="chkradio" >no</html:radio>
									</td>
								</tr>
								<tr>
									<td class="formTable" width="1%">Payment Method of Hui Distribution</td>
										<td align="left">
											<html:radio property="hphType" value="0" styleClass="chkradio" >Hui Distribution-Consign for Sale</html:radio>
											<html:radio property="hphType" value="1" styleClass="chkradio" >Hui Distribution-Payment Days</html:radio>
										</td>
									</td>
										
										<td class="formTable" width="1%">Way for Distributor to Make a Write-off</td>
										<td align="left">
                                            <span>T+</span><span id="verify-mode-current-value">3</span>
                                            <input type="hidden" id="verify-mode-origin-value" value="3">
                                            <html:hidden property="verificationMode" value="3"></html:hidden>
                                            <input type="button" id="verify-mode-dialog-open-btn" value="Change" style="width: 35px;">
                                            <span id="verify-mode-rule-desc">${verifyModeRule.ruleDesc}</span>
										</td>
										
										
								</tr>
								
									
								
								
								<tr>
									<td class="formTable" width="1%">Payment Days</td>
										<td align="left">
											<html:text property="paymentDays"
											styleId="paymentDays"></html:text>
										</td>
									<td class="formTable" width="1%"><font color='red'>*</font>Date of Signing the Contract：</td>
									<td align="left">
										<html:text property="contractDate" styleId="contractDate" onclick="WdatePicker({dateFmt:'yyyy-MM-dd','lang':'en'});" readonly="true" styleClass="date_but"></html:text>
									</td>
								</tr>
								<tr>
									<td class="formTable" width="1%">Distributor Abbreviation</td>
									<td align="left">
										<html:text property="simpleName"
												   styleId="simpleName"></html:text>
									</td>
									<td class="formTable" width="1%"><font color='red'>*</font>With a Business License or not：</td>
									<td align="left" width="1%">
										<html:select property="isMatchLicence" styleId="isMatchLicence">
											<html:option value="1">yes</html:option>
											<html:option value="0">no</html:option>
										</html:select>
									</td>
								</tr>
								<tr style="display: none;" id="cashPayShow">
									<td class="formTable" width="1%"><font color='red'>*</font>Support Cash Payment or not：</td>
									<td align="left" width="1%">
										<html:select name="ec" property="cashPay" >
											<html:option value="">Please select</html:option>
											<html:option value="1">yes</html:option>
											<html:option value="0">no</html:option>
										</html:select>
									</td>
									<td class="formTable" width="1%"></td>
									<td align="left">
									</td>
								</tr>
								
								<tr>
									<td class="formTable" width="1%"><font color='red'>*</font>Role：</td>
									<td align="left" width="1%">
										<html:select property="custTitle" styleId="custTitle"  value="经销商">
										<c:if test="${not empty custTitles}">
											<html:option value="">Please select</html:option>
								    		<html:optionsCollection name="custTitles" label="cusTitle" value="cusTitle" />
										</c:if>
								    	</html:select>
									</td>
									<td class="formTable" width="1%">Opening Time</td>
									<td align="left">
										<html:text property="businessTime" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss','lang':'en'});" readonly="true" styleClass="date_but"></html:text>
									</td>
								</tr>
								
								<tr>
									<td class="formTable" width="1%"><font color='red'>*</font>Longitude</td>
										<td align="left"><html:text property="longitude"
												styleId="longitude"></html:text></td>
									<td class="formTable" width="1%"><font color='red'>*</font>Latitude</td>
									<td align="left"><html:text property="latitude"
											styleId="latitude"></html:text></td>
								</tr>
								
								<tr>
									<td class="formTable" width="1%">Location Error</td>
										<td align="left"><html:text property="locAccuracy"></html:text>
										</td>
									<td class="formTable" width="1%">Coordinate Format</td>
									<td align="left"><html:text property="coordinateType"></html:text>
									</td>
								</tr>
								<tr>
									<td class="formTable" width="1%">Name on Business Registration</td>
									<td align="left"><html:text property="bussinessRegName" styleId="bussinessRegName" ></html:text>
									</td>
									<td class="formTable" width="1%">Distributor Type</td>
									<td align="left">
								    	<html:select property="dealerType" styleId="dealerType">
											<html:option value="">Please select</html:option>
											<logic:notEmpty name="dealerTypes">
											   	<c:forEach items="${dealerTypes}" var="dType">
													<html:option value="${dType.itemCode}">${dType.itemName}</html:option>
												</c:forEach> 
										    </logic:notEmpty>
										</html:select>	
									</td>
								</tr>
								<td class="formTable" width="1%"><font color='red'>*</font>Distributor Type：</td>
								<td align="left" width="1%">
									<html:select property="dealerSourceType" styleId="dealerSourceType">
										<c:if test="${not empty dealerSourceTypes}">
											<html:option value="">Please select</html:option>
											<html:optionsCollection name="dealerSourceTypes" label="itemName"
												value="itemName" />
										</c:if>
									</html:select>
								</td>
                                <td class="formTable" width="1%"><font color="red">*</font>A Five-star Distributor or not：</td>
                                <td align="left" width="1%">
                                    <html:select property="isFiveStar" styleId="isFiveStar">
                                        <html:option value="0">yes</html:option>
                                        <html:option value="1">no</html:option>
                                    </html:select>
                                </td>
								<tr style="display: none">
									<td class="formTable" width="1%">Whether to enable the default delivery man</td>
										<td align="left" colspan="3">
											<c:forEach items="${poiDistributorNames}" var="distributorName" varStatus="status">
												 <input name="poiDistributorName" type="checkbox" value="${distributorName.distributorName }" class="chkradio">${distributorName.distributorName }</input> 
											</c:forEach>
										</td>
									
								</tr>
								<tr>
									<td class="formTable" width="1%"><font color='red'>*</font>Account Type：</td>
									<td align="left">
									<html:select property="accountType" styleId="accountType">
											<html:option value="1">Regular Account</html:option>
											<html:option value="2">Test Account</html:option>
										</html:select>	
										</td>
									<td class="formTable" width="1%">Whether a distributor in platform：</td>
									<td align="left" width="1%">
										<html:select property="userType" styleId="userType">
											<html:option value="0">yes</html:option>
											<html:option value="1">no</html:option>
										</html:select>
									</td>
								</tr>
								
								<%-- <tr>
									<td class="formTable" width="1%">是否是镇镇通经销商标记：</td>
									<td align="left">
									<html:select property="isZZTDealerSourceType" styleId="isZZTDealerSourceType">
											<html:option value="">Please select</html:option>
											<html:option value="0">否</html:option>
											<html:option value="1">是</html:option>
										</html:select>	
										</td>
								</tr> --%>
							
								<tr>
									<td class="formTable" width="1%">Promotional Tips (for General Customers)</td>
									<td align="left" colspan="3"><html:textarea rows="3"
											cols="124" property="promotionSimpleDesc"></html:textarea></td>
									<td></td>
									<td></td>
								</tr>
								<tr>
									<td class="formTable" width="1%">Promotional Tips (for the Second Batch)</td>
									<td align="left" colspan="3"><html:textarea rows="3"
											cols="124" property="promotionDetailDesc"></html:textarea></td>
									<td></td>
									<td></td>
								</tr>								
								<tr>
									<td class="formTable" width="1%">Distributor Profile</td>
									<td align="left" colspan="3"><html:textarea rows="6"
											cols="124" property="memo"></html:textarea></td>

								</tr>
							<tr>
								<td class="formTable"><font color="#FF0000">*</font>Business License</td>
								<td align="left" colspan="3">
									<html:link styleId="charterUrlLink" href="" target="_blank" style="color:#FF0000;display:none;">
										<img id="charterUrlImg" src="" width="30px" height="30px;"/>
									</html:link>
									<input readonly type="hidden" style="width:618px;" name="charterUrl" id="charterUrl" /> 
									<input type="button" value="Clear All" style="width:60px;" onclick="javascript:clearValue('charterUrl');"/>&nbsp;
									<input type="button" value="Upload a File" onclick="javascript:openUploadfileWindow('${grp}','charterUrl');"/>&nbsp;&nbsp;&nbsp;&nbsp;<font color="red">Image format only supported .jpg|.png|.gif|.jpeg</font>
								</td>
						 	 </tr>
						 	 <tr>
								<td class="formTable"><font color="#FF0000">*</font>Contract of Hui Order</td>
								<td align="left" colspan="3">
									<html:link styleId="hxdUrlLink" href="" target="_blank" style="color:#FF0000;display:none;">
										<img id="hxdUrlImg" src="" width="30px" height="30px;"/>
									</html:link>
									<input readonly type="hidden" style="width:618px;" name="hxdUrl" id="hxdUrl" /> 
									<input type="button" value="Clear All" style="width:60px;" onclick="javascript:clearValue('hxdUrl');"/>&nbsp;
									<input type="button" value="Upload a File" onclick="javascript:openUploadfileWindow('${grp}','hxdUrl');"/>&nbsp;&nbsp;&nbsp;&nbsp;<font color="red">Image format only supported .jpg|.png|.gif|.jpeg</font>
								</td>
						 	 </tr>
							<tr>
								<td class="formTable"><font color="#FF0000">*</font>Photo of Holding the ID Card</td>
								<td align="left" colspan="3">
									<html:link styleId="handheldIdCardUrlLink" href="" target="_blank" style="color:#FF0000;display:none;">
										<img id="handheldIdCardUrlImg" src="" width="30px" height="30px;"/>
									</html:link>
									<input readonly type="hidden" style="width:618px;" name="handheldIdCardUrl" id="handheldIdCardUrl" /> 
									<input type="button" value="Clear All" style="width:60px;" onclick="javascript:clearValue('handheldIdCardUrl');"/>&nbsp;
									<input type="button" value="Upload a File" onclick="javascript:openUploadfileWindow('${grp}','handheldIdCardUrl');"/>&nbsp;&nbsp;&nbsp;&nbsp;<font color="red">Image format only supported .jpg|.png|.gif|.jpeg</font>
								</td>
						 	 </tr>
							<tr>
								<td class="formTable"><font color="#FF0000">*</font>Front of ID Card：</td>
								<td align="left" colspan="3">
									<html:link  styleId="idCardUrlLink"  href="" target="_blank" style="color:#FF0000;display:none;">
										<img id="idCardUrlImg" src="" width="30px" height="30px;"/>
									</html:link>
									<input readonly type="hidden" style="width:618px;" name="idCardUrl" id="idCardUrl" /> 
									<input type="button" value="Clear All" style="width:60px;" onclick="javascript:clearValue('idCardUrl');"/>&nbsp;
									<input type="button" value="Upload a File" onclick="javascript:openUploadfileWindow('${grp}','idCardUrl');"/>&nbsp;&nbsp;&nbsp;&nbsp;<font color="red">Image format only supported .jpg|.png|.gif|.jpeg</font>
								</td>
						 	 </tr>
							<tr>
								<td class="formTable"><font color="#FF0000">*</font>Back of ID card</td>
								<td align="left" colspan="3">
									<html:link styleId="idCardBackUrlLink" href="" target="_blank" style="color:#FF0000;display:none;">
										<img id="idCardBackUrlImg" src="" width="30px" height="30px;"/>
									</html:link>
									<input readonly type="hidden" style="width:618px;" name="idCardBackUrl" id="idCardBackUrl" /> 
									<input type="button" value="Clear All" style="width:60px;" onclick="javascript:clearValue('idCardBackUrl');"/>&nbsp;
									<input type="button" value="Upload a File" onclick="javascript:openUploadfileWindow('${grp}','idCardBackUrl');"/>&nbsp;&nbsp;&nbsp;&nbsp;<font color="red">Image format only supported .jpg|.png|.gif|.jpeg</font>
									<br/>Description: the head picture of the certificate is clear, and the ID card number is clearly identifiable.  Agree with the evidence；
								</td>
						 	 </tr>
							</table>
						</div>
					</div>
					<div class="trail">
						<span class="fleft"></span><span class="fright"></span>
					</div>
				</div>
			</div>
			<div class="bosom_bottom">
				<span class="left"></span><span class="right"></span>
			</div>
		</div>
        <%@include file="verify-mode-dialog.jsp"%>
	</html:form>
	<html:javascript formName="crmWsCustomerInfoForm"
		staticJavascript="false" dynamicJavascript="true" cdata="false" />
	<script type="text/javascript" src="${ctx}/scripts/validator.jsp"></script>
</body>
</html>